package nl.hanze.web.homegrownrpc.addressbook;

import java.util.List;

public class AddressBookStub extends nl.hanze.web.homegrownrpc.generic.Stub implements nl.hanze.web.homegrownrpc.addressbook.AddressBook {

    public void addStudent(Student student) throws Exception {
        invokeSkel("addStudent", new Class[] {Student.class}, new Object[] {student});
    }

    public boolean removeStudent(int stdNummer) throws Exception {
        return ((Boolean) invokeSkel("removeStudent", new Class[] {int.class}, new Object[] {stdNummer})).booleanValue();
    }

    public List<Student> getAllStudentsAsList() throws Exception {
        return (List<Student>) invokeSkel("getAllStudentsAsList", null, null);
    }

    public Student[] getAllStudentsAsArray() throws Exception {
        return (Student[]) invokeSkel("getAllStudentsAsArray", null, null);
    }

    public int countStudents() throws Exception {
        return ((Integer) invokeSkel("countStudents", null, null)).intValue();
    }

}
